package com.copa.utils;

import cn.hutool.json.JSONUtil;
import com.copa.module.user.domain.vo.WechatUserVo;
import com.google.gson.JsonParser;
import org.apache.poi.ss.formula.functions.T;

/**
 * @author copa
 * @createDate 2021-01-13 20:18
 * @function
 */
public class JsonUtils {

    public static<T> T parseJson(String json, Class<T> beanClass, String className) {
        String jsonPlus = json.substring(json.indexOf("\":") + 2, json.length() - 1);
        T data = JSONUtil.toBean(jsonPlus, beanClass);
        return data;
    }
}
